<template>
  <div>
    <mt-header fixed :title="title" class="bj">
      <mt-button icon="back " slot="left" @click="fanhui()"></mt-button>
      <router-link to="/item1" slot="right">
        <!-- <mt-button ><font class="zt">登录|注册</font></mt-button> -->
      </router-link>
    </mt-header>
  </div>
</template>
<script>
import { mapState, mapGetters, mapMutations, mapActions } from "vuex";

export default {
  props: ["title","index"],
  data() {
    return {};
  },
  methods:{
        ...mapMutations(["xg"]),
    ...mapMutations(["userxg"]),
    ...mapMutations(["yxxg"]),
    fanhui(){
      if(this.index==0){
 this.$router.go(-1)
          this.xg(false)
      }else{
         this.$router.go(-1)
          this.xg(true)
      }
     
    }
  },
  computed: {
    ...mapState(["poot"]),
    ...mapState(["yx"]),
     ...mapState(["zhuantai"])
  }
};
</script>
<style >
.bj {
  background-color: rgb(84, 223, 57);
}
.zt {
  font-size: 3px;
}
</style>